package com.ruicar.afs.cloud.afscase.loanactivaterules.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.afscase.loanactivatepool.vo.LoanActivatePoolListVO;
import com.ruicar.afs.cloud.afscase.loanactivatepool.vo.LoanActivatePoolVO;
import com.ruicar.afs.cloud.afscase.loanactivaterules.entity.LoanActivateRules;
import com.ruicar.afs.cloud.afscase.loanactivaterules.vo.LoanActivateTrialVO;

import java.util.List;

/**
 * @author yk.Li
 * @description 放款激活规则Service
 * @date 2020/5/16 17:03
 */
public interface LoanActivateRulesService extends IService<LoanActivateRules> {
    /**
     * 命中规则处理
     *
     * @return
     */
    Boolean hitRules(String applyNo, String ruleId);

    /**
     * 通过规则id查询命中所有待激活池数据
     *
     * @param ruleId
     * @return
     */
    List<LoanActivateTrialVO> dealLoanActivatePoolByRule(String ruleId);

    /**
     * 通过规则id查询命中所有待激活池数据
     *
     * @return
     */
    IPage<LoanActivatePoolVO> newDealLoanActivatePoolByRule(Integer pageSize, Integer pageNumber);

    /**
     * @param
     * @description 通过业务规则id使规则失效
     * @author yk.Li
     * @date 2020/7/6
     */
    void deActiveRuleByRuleNo(String[] ids);

    /**
     * @param
     * @description 停用规则
     * @author yk.Li
     * @date 2020/7/6
     */
    void deActiveRule(String id);

    /**
     * @param
     * @description 启用规则
     * @author yk.Li
     * @date 2020/7/6
     */
    void activeRule(String id);
}
